package edu.pku.sei.act.ctrl.editpart;

import java.beans.PropertyChangeEvent;
import org.eclipse.draw2d.IFigure;
import edu.pku.sei.act.ctrl.figure.DataFigure;
import edu.pku.sei.act.images.ArchiModelImageProvider;
import edu.pku.sei.act.model.mote.Data;
import edu.pku.sei.gmp.controller.editpart.GMPNodeEditPart;

public class DataEditPart extends GMPNodeEditPart{
	
	protected IFigure createFigure() {
		return new DataFigure("Data",ArchiModelImageProvider.DATALARGE);
	}

	private Data getData() {
		return (Data) getModelElement();
	}

	public void handlePropertyChanged(PropertyChangeEvent event) {
		refreshVisuals();
		super.handlePropertyChanged(event);
	}

	protected void refreshVisuals() {
		((DataFigure)figure).setName("Data");
		super.refreshVisuals();
	}


}
